Skip to content

GH-145378: Use PyREPL as the default input console for pdb#145379

Open
gaogaotiantian wants to merge 5 commits intopython:mainfrom
gaogaotiantian:pdb-pyrepl
Open

GH-145378: Use PyREPL as the default input console for pdb#145379
gaogaotiantian wants to merge 5 commits intopython:mainfrom
gaogaotiantian:pdb-pyrepl

Conversation

@gaogaotiantian
Copy link
Member

@gaogaotiantian gaogaotiantian commented Mar 1, 2026

@gaogaotiantian
Copy link
Member Author

@pablogsal and @ambv as the original author for the new interactive shell. Could you take a look when you have some time, thanks!

@johnslavik johnslavik self-requested a review March 2, 2026 19:54
def readline(self):
from _pyrepl.simple_interact import _more_lines

def more_lines(text):
Copy link
Contributor

@tanloong tanloong Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super excited about PyREPL into pdb!

Just wanted to flag a small issue I ran into on Windows: pressing Ctrl+Z+Enter does not quit pdb, instead it throws a SyntaxError: invalild non-printable character U+001A.

I did a quick experiment, if we add a ^Z check in more_lines function, the issue seems to be resolved. Not sure if this is the most elegant fix, but in case it helps.

def more_lines(text):
    if text.rstrip().endswith("\x1a"):
        raise EOFError
    ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants